Changeset - 1aa109aea143
[Not reviewed]
stable
0 1 0
Mads Kiilerich (kiilerix) - 17 months ago 2023-05-07 16:20:50
mads@kiilerich.com
repo group: stop giving explicit admin permission to owner on create

The repo owner will always get admin permissions when computing permissions, so
there is no need to assign these permissions explicitly.

Note: Permissions that has been added in the past are redundant but will be kept.
1 file changed with 0 insertions and 6 deletions:
0 comments (0 inline, 0 general)
kallithea/model/repo_group.py
Show inline comments
 
@@ -148,12 +148,6 @@ class RepoGroupModel(object):
 

	
 
            meta.Session().add(new_repo_group)
 

	
 
            # create an ADMIN permission for owner except if we're super admin,
 
            # later owner should go into the owner field of groups
 
            if not owner.is_admin:
 
                self.grant_user_permission(repo_group=new_repo_group,
 
                                           user=owner, perm='group.admin')
 

	
 
            if parent_group and copy_permissions:
 
                # copy permissions from parent
 
                user_perms = db.UserRepoGroupToPerm.query() \
0 comments (0 inline, 0 general)